export function handleStyle(css: string | undefined, id: string | undefined) {
  // 处理 css
  let style: HTMLStyleElement | null = null;
  if (id) {
    style = document.querySelector(`style[data-id="${id}"]`);
  }
  if (css) {
    if (!style) {
      style = document.createElement('style');
      if (id) {
        style.dataset.id = id;
      }
      const head = document.head || document.querySelectorAll('head')[0];
      head.append(style);
    }
    if (style.innerHTML !== css) {
      style.innerHTML = css;
    }
  } else if (style) {
    style.remove();
  }
}

export function createRender() {
  this.block;
}
